# 导包
import jsonschema
resp={ "success": True, "code": 10000, "message": "操作成功" }

#组织规则
sched = schema={ "type": "object",
         "properties": { "success": { "type": "boolean" },
                         "code": { "type": "integer" },
                         "message": { "type": "string" } },
         "required": ["success", "code", "message"] }
#校验实际结果是否符合预期结果
res = jsonschema.validate(instance=resp,schema=sched)
print(res)